﻿<html>
<head runat="server">
    <title>Index</title>
    <link rel="stylesheet" type="text/css" href="/uploadify/uploadify.css" />    
    <script src="/uploadify/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>
    <script src="/uploadify/jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script>
    <script src="/uploadify/swfobject.js" type="text/javascript"></script>
    <script src="/Scripts/ajax-RoomClass.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#fileInput').uploadify({
                'uploader': '@Url.Content("~/Uploadify/uploadify.swf")',
           'cancelImg': '@Url.Content("~/Uploadify/cancel.png")',
           'buttonText': 'Upload File',
           'script': '@Url.Action("Upload", "Manager")',
           'auto': false,
           'multi': false,
           'fileDesc': 'Image Files',
           'fileExt': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
           'queueSizeLimit': 90,
           'sizeLimit': 4000000,
           'buttonText': 'Choose Image',
           'folder': '@Url.Content("~/Images")',
           'onAllComplete': function (event, queueID, fileObj, response, data) {
               alert('finished');
           }
           //Write whatever you want here. It fires when upload is complete!

       });

       });
</script>
</head>
<body>
    
    <link rel="stylesheet" href="~/Content/admin/adminMenu.css" />
    <link rel="stylesheet" href="~/Content/manager/roomClassStyle.css" />

    <div class="navbox">
    <ul class="nav">
        <li><a href="ShowRoomClass">Quản lý hạng phòng</a></li>
        <li><a href="ShowRoomType">Quản lý loại phòng</a></li>
        <li><a href="ShowRoom">Quản lý phòng</a></li>
        <li><a href="ShowPrice">Quản lý giá</a></li>
    </ul>
    </div>
    



    <div id="main">
        <div class="tittle">
            <p class="gkHeadline">Quản lý hạng phòng</p>
            <p class="gkSubHeadline" style="margin-top:-4px;margin-bottom:7px">Caravelle Hotel</p>
        </div>
       @foreach (var l in ViewData.Model.HangPhongs)
       { 
           <form action="Update_RoomType" >
               <a id = '@l.maHang' class="showInfor_RoomType">@l.tenHang</a>
               <div class = 'hidden classBox float' id="info_@l.maHang">
                   <div class="blockA">
                       <label for="maHang_@l.maHang">Mã hạng </label>
                       <input class='block' type='text' id='maHang_@l.maHang' name='maHang' disabled = 'disabled' value = '@l.maHang'/><br>
                       <label for="tenHang_@l.maHang">Tên hạng </label>
                       <input class='block' type='text' id='tenHang_@l.maHang' name='tenHang' value = '@l.tenHang'/><br>
                   </div>
                   <div class="blockB">
                       <label class="moTa" for="moTa_@l.maHang">Mô tả </label>
                       <textarea rows='4' cols='50' class='blockB' id='moTa_@l.maHang' name='moTa'>@l.moTa</textarea><br>
                   </div>
                   <label class="labImg" for="img_@l.maHang">Hình ảnh </label>
                   <img  class='imgClass' id='img_@l.maHang' src='/Images/@l.img_name'/><br>
                   <input type ="hidden" name="id" value="@l.maHang" class="maHang"/>
                   <div id="notice_@l.maHang" class="notice"></div>                   
                   <a id="_@l.maHang" class="update btnInner"><img src="~/Images/icon/24_edit.png" /></a>
                   <a id="=@l.maHang" class="delete btnInner"><img src="~/Images/icon/24_trash.png" /></a>
               </div>
           </form>
           
       }
    
        <div id="btnAddRoom">
            <a id="btn_add_room" class="btn" >+</a>
            <div class = 'hidden_new classBox' id="info_new">
                <label class='blockA'>Tên hạng </label>
                <input class='blockB' type='text' id='tenHang_new' name='tenHang' /><br>
                <label class='moTa'>Mô tả </label>
                <textarea rows='4' cols='50' class='blockB' id='moTa_new' name='moTa'></textarea><br>
                <label class='labUpload'>Hình ảnh </label>
                <input id="fileInput" name="fileInput" type="file" > 
                <div id="notice_new" class="notice"></div>
                <a id="btn_add" class="add btnInner"><img src="~/Images/icon/24_upload.png" /></a>
            </div>
        </div>
    </div>
    <!--<input id="beginupload" name="beginupload" type="button" onclick="javascript: $('#fileInput').uploadifyUpload();" /> -->
    <div class="clear"></div>
</body>
</html>